Skip to content

Conversation

iliasbo
Copy link
Member

@iliasbo iliasbo commented Sep 9, 2026

Description

This PR resolves #5 by implementing the core filtering and navigation controller logic, along with comprehensive unit tests using Vitest.

Changes Made

  • Added pokemonController.ts with logic for handling filters (type, ability, physical stats, base stats) and fetching adjacent Pokémon (GetNext, GetPrev, GetNextFiltered, GetPrevFiltered).
  • Added unit tests in pokemonController.test.ts covering validation rules, API mocking, and edge cases (e.g., reaching maximum ID boundaries or API errors).
  • Cleaned up unused setup files (.gitkeep).

Testing

  • Executed npm test locally.
  • All 11 unit tests for pokemonController passed successfully.

Related Issue

Closes #5

@iliasbo iliasbo requested a review from a team as a code owner September 9, 2026 13:30
Copy link
Member

@thomhet thomhet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thomhet thomhet merged commit 1817990 into main Sep 13, 2026
@thomhet thomhet deleted the feature/issue-5-filtering-logic branch September 13, 2026 20:37
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filtering Logic
2 participants